<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::group('api', function () {
    Route::post('login','home.login/index'); //登录
    Route::post('register','home.login/register'); //注册
    Route::get('mobileCode','home.login/createMobileCode'); //获取验证码
})->allowCrossDomain();;


Route::group('api', function () {
    Route::get('user','home.user/index'); //用户中心
})->middleware(\app\middleware\Check::class)->allowCrossDomain();;
